﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Composite.Regions;

namespace BlueMarble.Genesis.Security
{
    public class SecurityModule : IModule
    {
        private readonly IUnityContainer container;
        private readonly IRegionManager regionManager;

        public SecurityModule(IUnityContainer container, IRegionManager regionManager)
        {
            this.container = container;
            this.regionManager = regionManager;
        }

        #region IModule Members

        public void Initialize()
        {
            RegisterViewsAndServices();
        }

        protected void RegisterViewsAndServices()
        {
            container.RegisterType<BlueMarble.Genesis.Infrastructure.Interfaces.IAuthenticationViewModel, Authentication.AuthenticationViewModel>(new ContainerControlledLifetimeManager());
        }

        #endregion

    }
}
